home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 3006 / 3006.xpi / chrome / dwhelper.jar / content / popup-button.xml < prev    next >
Extensible Markup Language  |  2010-01-15  |  2KB  |  60 lines

  1. <?xml version="1.0"?>
  2. <!-- *****************************************************************************
  3.     *            Copyright (c) 2006-2009 Michel Gutierrez. All Rights Reserved.
  4.     ****************************************************************************** -->
  5. <!DOCTYPE bindings SYSTEM "chrome://dwhelper/locale/dwhelper.dtd" >
  6.  
  7. <bindings xmlns="http://www.mozilla.org/xbl"
  8.     xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  9.     xmlns:html="http://www.w3.org/1999/xhtml"
  10.     xmlns:xbl="http://www.mozilla.org/xbl">
  11.  
  12.     <binding id="PopupButton" extends="widgets.xml#widget">
  13.  
  14.         <xbl:content
  15.             xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  16.             <box anonid="xButtonBox" onclick="this.parentNode.buttonClick()">
  17.  
  18.                 <label xbl:inherits="value=label" anonid="xLabel" hidden="true"/>
  19.                 <image xbl:inherits="src=image" anonid="xImage" hidden="true" class="popup-button-image"/> 
  20.                 <image class="popup-button-arrow"/>
  21.  
  22.                 <menupopup anonid="xMenuPopup" class="popup-button-menupopup" 
  23.                     onpopupshowing=""
  24.                     oncommand="setTimeout(function(pp){pp.hidePopup();},0,this)"
  25.                     onclick="">
  26.  
  27.                     <xbl:children />
  28.  
  29.                 </menupopup>
  30.             </box>
  31.  
  32.         </xbl:content>
  33.  
  34.         <implementation>
  35.  
  36.             <constructor>
  37.                 <![CDATA[
  38. var label=this.getAttribute("label");
  39. if(label!=null && label.length>0)
  40.     this.xLabel.setAttribute("hidden","false");
  41. var image=this.getAttribute("image");
  42. if(image!=null && image.length>0)
  43.     this.xImage.setAttribute("hidden","false");
  44.                 ]]>
  45.             </constructor>
  46.             
  47.             <method name="buttonClick">
  48.                 <body>
  49.                 <![CDATA[
  50. this.xMenuPopup.showPopup(this.xButtonBox,-1,-1,"popup","bottomleft","topleft");
  51.                 ]]>
  52.                 </body>
  53.             </method>
  54.  
  55.         </implementation>
  56.  
  57.     </binding>
  58.  
  59. </bindings>
  60.